﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace TyNetCoreBlog.Helpers
{

    /// <summary>
    /// 博客分页参数类
    /// </summary>
    public class BlogResourceParameters
    {
        public const int MaxPageSize = 20;
        private int _pageSize = 6;

        // 页码
        public int PageNum { get; set; } = 1;
        // 分页大小
        public int PageSize {
            get { return _pageSize; }
            set {
                _pageSize = (value > MaxPageSize) ? MaxPageSize : value;
            }
        }
        // 搜索字符串
        public string Keywords { get; set; }
        
    }
}
